package com.chb.demo.dao;

import com.chb.demo.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderDao extends JpaRepository<Order,Integer> {
    @Modifying
    @Query(value = "insert into order(pid,account,otime) values(?1,?2,SYSDATE())",nativeQuery = true)
    void savemyorder(Integer pid, String account);
}
